package com.qcit.pach.plugin


import com.android.build.gradle.AppPlugin

import org.gradle.api.GradleException
import org.gradle.api.Plugin
import org.gradle.api.Project

class PatchPlugin implements Plugin<Project> {

    @Override
    public void apply(Project project) {
        if (!project.getPlugins().hasPlugin(AppPlugin.class)) {
            throw new GradleException("无法在非android application插件中使用插件");
        }
        project.extensions.create("AParmterPatch", AParmterPatchExtension);
        project.android.registerTransform(new AParameterTransForm(project))//页面参数传递 绑定界面
    }
}
